import xlrd
data = xlrd.open_workbook('test.xlsx')
# 常用函数
print(data.sheet_loaded(0))
data.unload_sheet(0)
print(data.sheet_loaded(0))
print(data.sheet_loaded(1))
print(data.sheets())
print(data.sheets()[0])
print(data.sheet_by_index(0))
print(data.sheet_by_name('积分排行榜'))
print(data.sheet_names())
print(data.nsheets)

# 操作行
sheet=data.sheet_by_index(0)
print(sheet.nrows)
print(sheet.row(1))
print(sheet.row_types(1))
print(sheet.row(1)[2].value)
print(sheet.row_values(1))
print(sheet.row_len(1))

# 操作列
sheet=data.sheet_by_index(0)
print(sheet.ncols)
print(sheet.col(1))
print(sheet.col(1)[2].value)
print(sheet.col_values(1))
print(sheet.col_types(4))

# 操作单元格
sheet=data.sheet_by_index(0)
print(sheet.cell(1,2))
print(sheet.cell_type(1,2))
print(sheet.cell(1,2).ctype)
print(sheet.cell(1,2).value)
print(sheet.cell_value(1,2))
